<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // const obj = {
        //     name: "张三",
        //     age: 18,
        //     sex: "male"
        // }

        // let {name, age, sex} = obj
        // console.log(name, age, sex)

        // let {name, age} = obj
        // console.log(name, age)

        // let {name, ...rest} = obj
        // console.log(name, rest)

        // let {name : uname} = obj
        // console.log(uname)

        const obj = {
            data: {
                code: 10000,
                message: '频道列表获取成功',
                result: ['HTML', 'CSS', 'JavaScript', 'Vue', 'SprintBoot']
            },
            status: 200,
            statusText: 'Ok'
        }
        let {data: tempObj} = obj
        console.log(tempObj)
        let {code, message, result: list} = tempObj
        console.log(code, message, list)
    </script>
</body>
</html>